package operation.chef;

import zy.Cust;
import zy.Warehouse;

/*
 *@Student 张策
 */
public class chef5 implements Ioperation {
    @Override
    public void work(Warehouse warehouse) {
        System.out.println("顾客信息列表:\n");
        System.out.println("VIP顾客个人信息:");
        for (int i = 0; i < warehouse.custs.size(); i++) {
            Cust cust = warehouse.custs.get(i);
            if(cust.getVIP().equals("普通用户")) {
                System.out.println("姓名:" + cust.getName() + " 现金" + cust.getMoney() + " " + cust.getVIP());
            }
        }
        System.out.println();
        System.out.println("普通顾客个人信息:");
        for (int i = 0; i < warehouse.custs.size(); i++) {
            Cust cust = warehouse.custs.get(i);
            if(cust.getVIP().equals("VIP用户")) {
                System.out.println("姓名:" + cust.getName() + " 现金" + cust.getMoney() + " " + cust.getVIP());
            }
        }
        System.out.println();
    }
}
